<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>尤物购物车</title>
  <link rel="stylesheet" href="layui/css/layui.css">
  <link rel="stylesheet" href="./css/shoppingCart.css">
  <script src="js/jquery-3.7.1.min.js"></script>
  <script src="js/vue.js"></script>
  <script src="js/worryGlobal.js"></script>
  <script src="js/shoppingCart.js"></script>
</head>
<body>

  <div style="display: block;position: absolute;top: 50px;left: 100px">
    <a href="worry.html" style="display: inline-block;font-size: 30px;font-family: '幼圆';color: #5F9EA0;font-weight: bolder">worry</a>
    <a href="#" style="display: inline-block;font-size: 20px;font-family: '幼圆';color: #5F9EA0;font-weight: bold">购物车</a>
  </div>
  <div class="container">
    <div class="site-nav" id="myDiv">
      <div class="site-nav-bd">
        <ul>
          <li><a id="me">我的</a></li>
          <li><img src="image/foreground/gouwuche.png">
            <a href="shoppingCart.html" style="position: relative">购物车
              <span id="total" style="display: none;position: absolute;background-color: red;padding:3px;color: #fff;width: 10px;height: 12px;text-align: center;border-radius: 13px;left: -30px;top: 0;font-size: 0">
                                <span style="position: absolute;left: 6px;top: -8px;font-size: 8px;font-weight: bold">0</span>
                            </span>
            </a></li>
          <li><img src="image/foreground/shoucangjia.png"><a href="favorite.html">收藏夹</a></li>
          <li>联系客服</li>
          <li> <a id="user"> 登录/注册</a></li>
        </ul>
      </div>
    </div>
    <div class="cart-left">
		<div id="aaa">
			<ul>
              全部商品（<span id="total2">0</span>）<br>
				<br>
				<li>
					<input  type="checkbox" id="selectAll"> 全选
					<button style="margin-left: 10px;border: 1px solid #aaa;color: #333" type="button" class="layui-btn layui-btn-primary">删除</button>
					<button style="margin-left: 10px;border: 1px solid #aaa;color: #333" type="button" class="layui-btn layui-btn-primary">移入收藏夹</button>
				</li>
			</ul>
		</div>
      <div class="cart-header">
      </div>

      <div class="cart-items" id="goods">
        <div class="cart-item" v-for="(good,index) in goodList" :key="index">
          <input type="checkbox" class="join-settlement" v-on:change="joinSettlement($event.target,index)">
          <div class="item-info">
            <img :src=('http://project-x.cn:9000/youwushoppingmall/product/'+good.pictureUrl) alt="商品图片" class="item-image" >
            <div class="item-details" style="width: 280px;margin-right: 20px">
              <h3>{{good.commodityName}}</h3>
              <p class="item-price" style="color: #FF5722">¥<span class="price">{{good.commodityPrices}}</span></p>
            </div>
          </div>
          <div class="item-quantity">
            <button disabled class="cut" v-on:click="cut($event.target)">-</button>
            <span class="number">1</span>
            <button class="add" v-on:click="add($event.target)">+</button>
          </div>
          <div class="item-actions1">
            <button>移入收藏夹</button>
            <button id="del" v-on:click="del($event.target,index,good.shoppingCommodityId)">删除</button>
          </div>
        </div>
      </div>
    </div>

    <div class="cart-right">
      <div class="cart-summary">
        <div class="summary-header">
          <h3>结算明细</h3>
          <p>已选<span id="number">0</span>件商品</p>
        </div>
        <div class="summary-items">
          <ul id="goodImages" style="display: none">
            <li v-on:mouseenter="aa($event.target)" v-on:mouseleave="bb($event.target)" v-for="(pic,index) in imageList" :key="index">
              <span class="remove" v-on:click="deselect($event.target,index,pic.idx)">取消选择</span>
              <img :src=(pic.pic)>
            </li>
          </ul>
          <span class="item-name" style="color: #aaa;margin: 0 auto;padding-top: 100px;height: 150px;display: inline-block">还没有待结算的商品</span>
        </div>
        <div class="summary-total">
          <span style="font-weight: bold">合计:<span id="amount" style="color: #FF5722;font-size: 20px">0.00</span></span>
		  <button class="summary-button" style="font-weight: bold;" id="settlement" disabled>结算</button>
        </div>
        
      </div>
    </div>
  </div>
</body>
</html>